package com.itheima.Demo;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

public class Demo字符缓冲输入流 {
    public static void main(String[] args) throws IOException {
        //创建对象;
        BufferedReader br = new BufferedReader(new FileReader("Day17codes\\aaa\\123.txt"));
        //普通流的方法缓冲流都有
        //一次读取一个字符
        //int  i ;
        //while ((i=br.read())!=-1){
        //    System.out.println((char) i);
        //}
        //一次读取一个字符数组
        char[] arr  = new char[1024];
        int  i  ;
        while ((i=br.read(arr))!=-1){
            System.out.println(new String(arr,0,i));
        }
        br.close();
    }
}
